package itcast.bos.base.service.imp;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import itcast.bos.base.dao.StandardRepostory;
import itcast.bos.base.service.IStandardService;
import itcast.bos.domain.base.Standard;

@Service
@Transactional
public class StandardService implements IStandardService{
	
	@Autowired
	private StandardRepostory dr;
	
	@Override
	public void save(Standard standard) {
		dr.save(standard);
		
	}

	@Override
	public Page<Standard> findPageData(Pageable pageable) {
		Page<Standard> list = dr.findAll(pageable);
		return list;
	}

	@Override
	public List<Standard> findAll() {
		
		return dr.findAll();
	}

}
